package cn.sirun.com.fca.account.loader;


import com.tencent.cloud.iov.kernel.model.BaseResponse;

import cn.sirun.com.fca.account.model.bind.RecognizePicRequest;
import cn.sirun.com.fca.account.model.bind.RecognizePicResponse;
import cn.sirun.com.fca.account.model.bind.SubmitOwnerInfoRequest;
import cn.sirun.com.fca.account.repo.bind.BindRepository;
import io.reactivex.Observable;
import io.reactivex.schedulers.Schedulers;

/**
 * @author vinsonhuang
 * @date 2018/5/4
 */
public class AuthenticationLoader extends AccountFlowLoader {

    public Observable<BaseResponse<RecognizePicResponse>> recognizePic(
            RecognizePicRequest request) {
        return BindRepository.getInstance().recognizePic(request)
                .subscribeOn(Schedulers.io());
    }


    public Observable<BaseResponse<Void>> submitOwnerInfo(SubmitOwnerInfoRequest request) {
        return BindRepository.getInstance().submitOwnerInfo(request)
                .subscribeOn(Schedulers.io());
    }

    public Observable<BaseResponse<RecognizePicResponse>> submitOwnerImg(SubmitOwnerInfoRequest request) {
        return BindRepository.getInstance().submitOwnerImg(request)
                .subscribeOn(Schedulers.io());
    }

}
